package TestNet;

import java.net.InetAddress;
import java.net.UnknownHostException;

public class TestIpAdress {
    public static void main (String[] args) throws UnknownHostException {
        InetAddress ip=InetAddress.getLocalHost ();
        InetAddress ip1=InetAddress.getByName ("128.0.0.1");
        System.out.println (ip.getHostName ());
    }
}
